<div class="row animated" ng-class="{true: 'fadeInRight', false:'fadeInLeft'}[currentAnimated]">
  <div class="panel panel-default">
    <div class="panel-heading">
      <a ng-click="discard()" href="javascript:;"><i class="backBtn fa fa-arrow-circle-left"></i></a>
      <span class="panelTitle" ng-bind="Form.title"></span>
    </div>
    <div class="panel-body">
      <form novalidate name="auctionForm" class="form-horizontal" role="form">
        <div class="form-group" ng-class="{'has-error': auctionForm.productId.$invalid && auctionForm.productId.$dirty}">
          <label class="control-label col-xs-3 col-md-2">拍卖商品：</label>
          <div class="col-xs-7 col-md-8">
            <input type="text" class="form-control w25c fl" readonly="readonly" name="productId" placeholder="拍卖商品" ng-model="auction.productId" required>
            <button class="btn btn-primary fl" data-toggle="modal" data-target="#chooseProductModal">选择商品</button>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': auctionForm.name.$invalid && auctionForm.name.$dirty}">
          <label class="control-label col-xs-3 col-md-2">拍卖名称：</label>
          <div class="col-xs-7 col-md-8">
            <input type="text" class="form-control w25c" name="name" placeholder="拍卖名称" ng-model="auction.name" required>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': auctionForm.content.$invalid && auctionForm.content.$dirty}">
          <label class="control-label col-xs-3 col-md-2">拍品描述：</label>
          <div class="col-xs-7 col-md-8">
            <textarea name="content" placeholder="拍品描述" id="editor" bind-model="auction.content" ng-bind-html="auction.content | trustHtml" keditor data-config="options" required ng-model="auction.contentBody">
            </textarea>
            <autosave module="auction" saveId="{{auction.id}}" interval="30000"></autosave>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': auctionForm.rule.$invalid && auctionForm.rule.$dirty}">
          <label class="control-label col-xs-3 col-md-2">购买须知：</label>
          <div class="col-xs-7 col-md-8">
            <textarea name="rule" placeholder="购买须知" id="editor2" bind-model="auction.rule" ng-bind-html="auction.rule | trustHtml" keditor data-config="options" required ng-model="auction.ruleBody">
            </textarea>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': auctionForm.startPrice.$invalid && auctionForm.startPrice.$dirty}">
          <label class="control-label col-xs-3 col-md-2">起拍价：</label>
          <div class="col-xs-7 col-md-8">
            <input type="number" class="form-control w25c" name="startPrice" placeholder="起拍价" ng-model="auction.startPrice" required>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': auctionForm.minPrice.$invalid && auctionForm.minPrice.$dirty}">
          <label class="control-label col-xs-3 col-md-2">保留价：</label>
          <div class="col-xs-7 col-md-8">
            <input type="number" class="form-control w25c" name="minPrice" placeholder="保留价" ng-model="auction.minPrice">
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': auctionForm.markup.$invalid && auctionForm.markup.$dirty}">
          <label class="control-label col-xs-3 col-md-2">加价幅度：</label>
          <div class="col-xs-7 col-md-8">
            <input type="number" class="form-control w25c" name="markup" placeholder="加价幅度" ng-model="auction.markup" required>
          </div>
        </div>
        <div class="form-group" ng-class="{'has-error': auctionForm.startTime.$invalid && auctionForm.startTime.$dirty}">
          <label class="control-label col-xs-3 col-md-2">起止时间：</label>
          <div class="col-xs-7 col-md-8">
            <input type="text" class="form-control w25c fl" name="startTime" id="startTime" itime placeholder="开始时间" ng-model="auction.startTime" required> <span class="to fl">至</span> <input type="text" class="form-control w25c fl" name="endTime" id="endTime" itime placeholder="结束时间" ng-model="auction.endTime" required>
          </div>
        </div>
        <div class="form-group">
          <label class="control-label col-xs-3 col-md-2">产品图：</label>
          <div class="col-xs-7 col-md-8">
            <div class="button btn btn-primary fl" ngf-select="upload($file)" ngf-pattern="'image/*'"
              ngf-accept="'image/*'" ngf-max-size="10MB">上传图片</div>
            <a href="javascript:void(0)" class="btn btn-info ml15" ng-click="openPhotoLibs()">图片库</a><span class="clearfix"></span>
            <bannerlist></bannerlist>
          </div>
        </div>
        <div class="form-group">
          <div class="col-xs-4 col-xs-offset-2">
            <button class="btn btn-primary" ng-click="submitForm()" ng-disabled="auctionForm.$invalid">保存</button>
            <button class="btn btn-white" ng-click="discard()">取消</button>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>
<imagepreview></imagepreview>
<upload-task></upload-task>

<script src="libs/kindeditor/kindeditor.js" type="text/javascript"></script>
<script src="libs/kindeditor/lang/zh-CN.js" type="text/javascript"></script>